package org.oos.atom.elements;

import static org.oos.model.UserAvatar.DEFAULT_AVATAR;

import org.oos.model.UserAvatar;

import com.google.api.client.util.Key;

public class ActivityObject extends AbstractActivityElement implements Cloneable {

	private static final long serialVersionUID = -1424729010092039735L;

	@Key("oos:slug")
	private String slug;
	
	@Key("oos:avatar")
	private String avatarUrl;
	private UserAvatar avatar;
	
	@Key("oos:fnv")
	private String fnv;
	
	public String getSlug() {
		return slug;
	}
	
	public UserAvatar getAvatar() {
		if (avatarUrl != null) {
			if (avatar == null) {
				avatar = new UserAvatar(avatarUrl);
			}
			return avatar;
		} else {
			return DEFAULT_AVATAR;
		}
	}
	
	public String getFnv() {
		return fnv;
	}

	@Override
	public ActivityObject clone() throws CloneNotSupportedException {
		return (ActivityObject) super.clone();
	}
	
}
